package com.zs.zcerp.common.utils;

import java.util.Arrays;
import java.util.List;

/**
 * 常量工具类
 * (用户订单分类)
 *
 * @author
 */
public abstract class ConstantUtil {

    /**
     * 判断String数组中是否包含某个字符串
     * @param source 如：String source = "aa,bb,cc,dd";
     * @param condition aa
     * @return  ture
     */
    public static boolean inContains(String source,String condition) {
        String str = source;
        String[] strs = str.split(",");
        List<String> list = Arrays.asList(strs);//将String数组转化为list集合
        return  list.contains(condition);
    }
    //样品单
    public static final String DESTORY_Y = "DESTORY_Y";
    //销毁单 type1,2,3
    public static final String DESTORY = "DESTORY";

    // type6 总表转采购单/直接采购单/原料采购单
    public static final String pomOrder = "POM,PO,PO6,BPO";
    // type15,16,17,18 加工单/总表转加工单/补料加工单/补料总表转加工单
    public static final String woOrder = "WO1,WO2,WO3";

    // type8 采购变更单
    public static final String PGOrder = "PG";
    // type10, 12 开发采购单/开发零星采购单
    public static final String KFPOOrder = "KFPO,KFPL";
    // type11 开发加工采购单
    public static final String KFPROrder = "KFPR";
    // type13 总务采购单
    public static final String GAPOOrder = "GAPO";
    // type14 模具采购单
    public static final String MDPOOrder = "MDPO";

    // type19  补料采购单  补料总表转采购单
   // public static final String BPOOrder = "BPO";
    // type20 加工变更单
    public static final String WPGOrder = "WPG";

    //开发采购单号
    public static final String kfOrder = "KFPO,KFPR,KFPL";
    //type22 固定资产异动单号
    public static final String FATRorder = "FATR";
    //23 固定资产转入单号
    public static final String FAINorder = "FAIN";
    // type24 底厂直接采购单/底厂采购单
    public static final String XPOOrder = "XPO,XPO1";
    // type26 采购变更单
    public static final String XPCOrder = "XPC";

    // 单据状态码 1-取消, 0-新单, 3-送签, 7-生效, 99-结案
    public static final String orderCancel = "1";
    public static final String orderNew = "0";
    public static final String orderSigning = "3";
    public static final String orderEffective = "7";
    public static final String orderClose = "99";

}
